/*
 * adfgvxDecipher.h
 *
 *  Created on: Sep 12, 2011
 *      Author: ibyte
 */

#ifndef ADFGVXDECIPHER_H_
#define ADFGVXDECIPHER_H_

#include "common.h"
#include "MatrixHandler.h"
#include "StatisticsHandler.h"
#include "string"
#include <cctype>
#include <map>
#include <math.h>

#define NUM_COLS 	2

using namespace std;

class adfgvxDecipher{
public:
	adfgvxDecipher();
	~adfgvxDecipher();
	void clearCipher();
	bool loadCipher(char* text, size_t numBytes);
	void attemptDecription(UINT numColStart, UINT numColEnd);
	void printResults();
protected:
private:

	struct SuDoubleInfo{
		double m_dValue;
		UINT m_ui64ColNum;
	};

	char* m_prgCipherText;
	UINT m_ui64TextSize;
	MatrixHandler *m_pCMatrixHandler;
	StatisticsHandler *m_pCStatsHandler;
	bool m_bLoadedSuccessfully;
	SuDoubleInfo *m_pSuDoubleInfo;
	UINT m_ui64NumInfos;
};

#endif /* ADFGVXDECIPHER_H_ */
